package com.zhongyu.controller;

import com.zhongyu.service.KuCunYvJingService;
import com.zhongyu.vo.PageResult;
import com.zhongyu.vo.ResultVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/sys/kuCun/")
public class KuCunYvJingController {

    @Resource
    private KuCunYvJingService kuCunYvJingService;

    @GetMapping("/search/{pageNo}/{pageSize}")
    public ResultVo search(@PathVariable Integer pageNo, @PathVariable Integer pageSize){
        PageResult pageResult=kuCunYvJingService.searchAll(pageNo, pageSize);
        return ResultVo.success(pageResult);
    }

}
